Class com.symantec.itools.beans.VetoableChangeSupport
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.symantec.itools.beans.VetoableChangeSupport

Object
   |
   +----VetoableChangeSupport
           |
           +----com.symantec.itools.beans.VetoableChangeSupport

public class VetoableChangeSupport
extends VetoableChangeSupport
implements Serializable
This is a utility class that can be used by beans that support constrained properties. Your can either inherit from this class or you can use an instance of this class as a member field of your bean and delegate various work to it.

This extension of the java.beans.VetoableChangeSupport class adds functionality to handle individual property changes.

Author:
Symantec

Variable Index

 o listenerTable
The listener table.

Constructor Index

 o com.symantec.itools.beans.VetoableChangeSupport(Object)
Constructs a VetoableChangeSupport object.

Method Index

 o addVetoableChangeListener(String, VetoableChangeListener)
Adds a VetoableListener to the listener list.
 o fireVetoableChange(String, Object, Object)
Reports a vetoable property update to any registered listeners.
 o removeVetoableChangeListener(String, VetoableChangeListener)
Removes a VetoableChangeListener from the listener list.

Variables

 o listenerTable
protected java.util.Hashtable listenerTable
The listener table.

See Also:
addVetoableChangeListener, removeVetoableChangeListener

Constructors

 o VetoableChangeSupport
public VetoableChangeSupport(Object sourceBean)
Constructs a VetoableChangeSupport object.

Parameters:
sourceBean - the bean to be given as the source for any events

Methods

 o addVetoableChangeListener
public synchronized void addVetoableChangeListener(String propertyName,
                                                   VetoableChangeListener listener)
Adds a VetoableListener to the listener list.

Parameters:
propertyName - the name of the property to add a listener for
listener - the VetoableChangeListener to be added
See Also:
removeVetoableChangeListener
 o fireVetoableChange
public void fireVetoableChange(String propertyName,
                               Object oldValue,
                               Object newValue) throws PropertyVetoException
Reports a vetoable property update to any registered listeners. If anyone vetos the change, then a new event is fired reverting everyone to the old value, and then the PropertyVetoException is rethrown.

No event is fired if old and new are equal and non-null.

Parameters:
propertyName - the programmatic name of the property that was changed
oldValue - the old value of the property
newValue - the new value of the property
Throws: PropertyVetoException
if the specified property value is unacceptable
Overrides:
fireVetoableChange in class VetoableChangeSupport
 o removeVetoableChangeListener
public synchronized void removeVetoableChangeListener(String propertyName,
                                                      VetoableChangeListener listener)
Removes a VetoableChangeListener from the listener list.

Parameters:
propertyName - the name of the property to remove a listener for.
listener - the VetoableChangeListener to be removed
See Also:
addVetoableChangeListener

All Packages  Class Hierarchy  This Package  Previous  Next  Index